home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 September
/
PCWorld_2006-09_cd.bin
/
v cisle
/
hexer
/
mpth_17.exe
/
{app}
/
scripts
/
copyhextoclipboard.mps
< prev
next >
Wrap
Text File
|
2006-06-05
|
737b
|
29 lines
include '*.lng'
= copy the current selection (or whole file, if nothing selected) to clipboard in
= formatted hex text format
= markus stephany, may 23, 2006
option opt5, 'copyhextoclipboard.ico':= set an icon for this script
= check if a file is currently open
IF (CURRENTFILE=="")
ERROR __ERR1__
ENDIF
= open current file
VAR curfile FILE
curfile = FILEOPEN("::current", "r")
IF (FILEGETPROP(curfile, "Size") == 0)
FILECLOSE curfile
ERROR __ERR2__
ENDIF
= check whether selection or whole file is to be copied
VAR selonly BYTE
selonly = (FILEGETPROP(curfile, "SelCount") != 0)
FILECLOSE curfile
!CMD.FileExport, ENVPARSE('%apppath%\scripts\export\ex-hextext.mps'), "::clipboard", selonly, 1